//
//  CategoryManagerItemVieww.swift
//  KoiAccounting
//
//  Created by 纪洪文 on 29.03.25.
//

import SwiftUI

struct CategoryManagerItemView: View {
    
    var item:AccountingCategory
    var moreIconClick:(AccountingCategory)->Void
    
    var body: some View {
        HStack {
            CategoryIconView(item: item)
            Text(item.name.orEmpty)
                .font(.system(size: 14))
                .foregroundColor(Color.koiColorTitle)
            Spacer()
            Button(action:{
                moreIconClick(item)
            }) {
                Image("koi_ic_more_horiz")
            }
            
        }
    }
}

#Preview {
    CategoryManagerItemView(item: AccountingCategory(name:"餐饮", icon: "linearicon://rice"), moreIconClick: { _ in})
}
